package com.company;

import java.util.Scanner;

public class Plus {
    static  StringBuilder num1=null;
    static  StringBuilder num2=null;
    public static void main(String[] args) {
        String num3;
        String num4;
        int flag;
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入两个数");
        num3=scanner.next();
        num4=scanner.next();
        num1=new StringBuilder(num3);
        num2=new StringBuilder(num4);
        int aa=0;
        int j=num1.length()-1;
        char aaa,bbb;
        StringBuilder ab=new StringBuilder();
        StringBuilder aaaaa = null;
        for (int i = 0; i < num1.length()-num2.length(); i++) {
            ab.append("0");
        }
        ab= ab.append(num2);
        num2=ab;
        for (int i = num2.length()-1; i >=0 ; i--,j--) {
            aaa=num1.charAt(j);
            bbb=num2.charAt(i);
            int a=num1.charAt(j)-'0'+num2.charAt(i)-'0'+aa;
            num1.setCharAt(j, (char) (a%10+'0'));
            if ((((aaa-'0'+bbb-'0'+aa))/10)>=1)
            { aa=1;
            }
            else {aa=0;
            }

        }
        if(aa==1)
            System.out.println("1" + num1);
        else
            System.out.println(num1);

    }
}
